Skip to content

Fix a crash when calling copy() on a flushed compress object on Python 3.15#80

Merged
rhpvorderman merged 5 commits into
pycompression:developfrom
edgarrmondragon:py315-crash
Jul 3, 2026
Merged

Fix a crash when calling copy() on a flushed compress object on Python 3.15#80
rhpvorderman merged 5 commits into
pycompression:developfrom
edgarrmondragon:py315-crash

Conversation

@edgarrmondragon

@edgarrmondragon edgarrmondragon commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Fix a crash when calling copy() on a flushed compress object on Python 3.15. Python 3.15 changed (gh-134745) PyThread_release_lock to use PyMutex internally, which now raises a fatal error when releasing a lock that was never acquired.

Checklist

  • Pull request details were added to CHANGELOG.rst
  • Documentation was updated (if needed)

Closes #75

…hon 3.15

Signed-off-by: Edgar Ramírez Mondragón <edgarrm358@gmail.com>
Signed-off-by: Edgar Ramírez Mondragón <edgarrm358@gmail.com>
Signed-off-by: Edgar Ramírez Mondragón <edgarrm358@gmail.com>
@edgarrmondragon edgarrmondragon changed the title chore: Allow usage of tox -e 3.15 -- <some pytest params> Fix a crash when calling copy() on a flushed compress object on Python 3.15 Jun 30, 2026
@rhpvorderman

Copy link
Copy Markdown
Contributor

Could you add python 3.15 to the .github/workflows/ci.yml ? So it will actually be tested to work?

@rhpvorderman

Copy link
Copy Markdown
Contributor

Thanks for doing this by the way!

Signed-off-by: Edgar Ramírez Mondragón <edgarrm358@gmail.com>
Signed-off-by: Edgar Ramírez Mondragón <edgarrm358@gmail.com>
@edgarrmondragon

Copy link
Copy Markdown
Contributor Author

Could you add python 3.15 to the .github/workflows/ci.yml ? So it will actually be tested to work?

Done!

I also noticed the macos-13 jobs were stuck due to the runner being removed, so I switched those over to macos-15-intel.

@rhpvorderman

Copy link
Copy Markdown
Contributor

Thanks. Help in these maintenance tasks is always much appreciated ❤️ !

@rhpvorderman rhpvorderman merged commit 10d2ffd into pycompression:develop Jul 3, 2026
24 checks passed
@rhpvorderman

Copy link
Copy Markdown
Contributor

Done. Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[heads up] segmentation fault with Python 3.15 when running test_badcompresscopy -> when zlib_Compress_copy initialization fails

2 participants